Skip to main content

yVideo

Description

The yVideo component serves as a powerful tool primarily designed for displaying a video. It's an adaptable element that allows both static and dynamic content.

Some uses for the yVideo are:

Basic Structure

In the following the basic structure of the yVideo shall be explained. For the general structure of a yComponent please visit the yBase-components basic-structure.

Video structure

Title

The header contains the title and description of the video and is displayed while playing and while being paused.

Video

The video itself represents the core element of the component.

Controlbar

The controlbar contains all elements which are connected to an event, like play/pause, a progress bar, the full screen toggle, the skip buttons, the playback rates, the picture in picture control and the submenu.

Properties

Through its various properties the yVideo can be configured to suit your needs. The display below provides you with an overview of all the yVideo properties.

Properties can be changed directly through three methods:

  • Inside the Toolbar, which is positioned in your workarea next to your component right where you need it. It shows the most important properties, thus providing a fast and efficient way to configure your component in the most basic way.
  • It may also occur in the Toolbar Extension, which is a seamless extension accesible as a dropdown item of the Toolbar. It extends the functionality of the Toolbar by providing advanced pickers for the most used properties.
  • Inside the Detail Panel, which is located in the righthand drawer. Every property of a component can be configured here.
METAread more
--y-video__component-id

The identifier of the component that is unique within a page.

--y-video__component-type

The type of the component. For this component it is -video.

--y-video__name

The custom name of the component. It serves for better identification of the component.

--y-video__version

The custom version of the Video-component. This can be used to ensure that all components work well together.

--y-video__core-theme

The CoreTheme, which will be apllied to the Video. For further information on themes visit the themes page.

--y-video__sub-theme

The subtheme subordinated to the previously specified CoreTheme, which will be apllied to the Video. For further information on themes visit the themes page.

--y-video__group-theme

The group theme is a further variation of the subtheme which is specified especially for variations of a component inside the subtheme. For further information on themes visit the Theme-Manager page.

DISPLAYread more
--y-video__display

This property specifies the display behavior of the component. This can be be set to:

  • none
  • block
  • flex
  • inline
--y-video__position

This property specifies the type of positioning method used for the component. This can be be set to:

  • static
  • relative
  • absolute
  • sticky
  • fixed
--y-video__visible

This property can toggle the visibility of the component. The two modes are completely hidden and fully shown.

SIZEread more
--y-video__min-width

The minimum value for the width of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
--y-video__min-height

The minimum value for the height of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %

The value for the width of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
  • auto

The value for the height of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
  • auto
--y-video__max-width

The maximum value for the width of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
  • none
--y-video__max-height

The maximum value for the height of the component. This can be set in:

  • px
  • pt
  • em
  • vw
  • vh
  • %
  • none
--y-video__flex

The flex property sets the length on flexible items. This sets the value in n-fold shares extrapolated to all other components with the flex display within the same container.

PLACEMENTread more
--y-video__margin-top

This property creates a space around the component, outside of the top border. This can be set in percent or pixels.

--y-video__margin-right

This property creates a space around the component, outside of the right border. This can be set in percent or pixels.

--y-video__margin-bottom

This property creates a space around the component, outside of the bottom border. This can be set in percent or pixels.

--y-video__margin-left

This property creates a space around the component, outside of the left border. This can be set in percent or pixels.

--y-video__padding-top

This property creates a space within the component, inside of the top border. This can be set in percent or pixels.

--y-video__padding-right

This property creates a space within the component, inside of the right border. This can be set in percent or pixels.

--y-video__padding-bottom

This property creates a space within the component, inside of the bottom border. This can be set in percent or pixels.

--y-video__padding-left

This property creates a space within the component, inside of the top border. This can be set in percent or pixels.

Usage

In this section you will find a collection of application scenarios and examples that illustrate how to leverage the yVideo in ways that deviate from its standard behavior, as defined by yBase. This section aims to inspire and guide you through various possibilities, helping you to implement more complex or unique functionalities tailored to your specific needs. General properties that are universally applicable can be found in the yBase usage section.

Autoplay

Being eager to start a video when opening a page, autoplay enables to do this without the need of coding.

How to:

  1. Open the Detail Panel and navigate to the Style tab to open the PlayerMode section.
  2. Now toggle the playerMode__autoplay to true to enable autoplay.

Adding Text Tracks

You can customize the availlable text-tracks of your video by yourself.

How to:

  1. Open the Detail Panel and navigate to the Style tab to open the Video section.
  2. Open the Tracklist Picker by clicking on video__textTrack.
  3. This provides an overview of the existing options. Now create a new entry!
  4. Then you proceed to set kind to subtitle for creating a new subtitle. Change label to German and value to de.
  5. Now continue by setting src to an url which contains the subtitles as a resource.

Customizing the Controlbar

The actual controlbar can be customized by the user itself. E.g. the buttons can be styled.

yVideo with custom controlbar
Custom Controlbar
genericsizeminWidth800px
genericsizeminHeight500px
styleborderborderRadius8px
stylecontrolBarcontrolBar__background#44ddbb
stylecontrolBarcontrolBar__iconColor#ffffff

Thumbnail

As a developer, you can provide an Thumbnail for your video which gets displayed before playing the video itself.

How to:

  1. Open the Detail Panel and navigate to the Style tab to open the PlayerMode section.
  2. Now provide the video\_\_poster by entering an url for an image resource.